import request from '@/utils/request'
import type {
  patientHomeKnowledgeApi,
  patientHomeKnowledgeReq,
  homePageDocApi,
  homePageDocReq,
  likePostReq
} from '@/types/home'

// 获取首页文章列表
export const patientHomeKnowledge = (data: patientHomeKnowledgeReq) => {
  return request<patientHomeKnowledgeApi>('/patient/home/knowledge', 'get', data)
}

// 获取关注医生列表
export const homePageDoc = (data: homePageDocReq) => {
  return request<homePageDocApi>('/home/page/doc', 'get', data)
}

// 关注

export const likePost = (data: likePostReq) => {
  return request('/like', 'post', data)
}
